package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"shop-ease/api/internal/config"
	"shop-ease/shoprpc/shoprpcclient"
)

type ServiceContext struct {
	Config  config.Config
	ShopRpc shoprpcclient.Shoprpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		ShopRpc: shoprpcclient.NewShoprpc(zrpc.MustNewClient(c.ShopRpc)),
	}
}
